﻿namespace Modbus.Messages
{
	internal sealed class ReadDataResponse : ModbusMessage
	{
		private byte[] data;

		public override void Read(ModbusReader reader)
		{
			base.Read(reader);

			this.data = DataUtility.ReadData(reader);
		}

		public override void Write(ModbusWriter writer)
		{
			base.Write(writer);

			DataUtility.WriteData(writer, this.data);
		}

		public byte[] Data
		{
			get { return this.data; }
			set { this.data = value; }
		}
	}
}
